package org.bright.controller;

import org.bright.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

@RestController
@RequestMapping("/userRest")
public class UserRestController {
    @PostMapping()
    public String saveUser(User user){
        return null;
    }

    @PutMapping("/updateUser")
    public String updateUser(User user){
        return null;
    }

    @DeleteMapping("/{userId}")
    public String deleteUser(@PathVariable Integer userId){
        System.out.println(userId);
        return "abc";
    }

    @GetMapping("/{userId}")
    public User getUserDetail(@PathVariable Integer userId){
        System.out.println(userId);
        return null;
    }
}
